var DEBUG_MODE = false;
function __Debug__(error, data)
{
	if ( arguments.length < 2 )
	{
		alert('The arguments length is less than 2.');
		return;
	}
	if ( DEBUG_MODE )
	{
		var winopen = window.open();
		if ( winopen )
		{
			winopen.document.write('number: ' + (error.number & 0xFFFF) + '<br />');
			winopen.document.write('name: ' + error.name + '<br />');
			winopen.document.write('line: ' + error.line + '<br />');
			winopen.document.write('message: ' + error.message + '<br />');
			winopen.document.write('description: ' + error.description + '<br />');
			winopen.document.write('URL: ' + document.location + '<br />');
			winopen.document.write('<br><b>Debug data:</b><br><hr>\r\n\r\n');
			winopen.document.write(data);
			winopen.document.write('\r\n\r\n<hr size=1><a href="view-source:' + document.location + '">View Source</a>');
			winopen.document.close();
		}
	}
	else
	{
		var errorInfo = null;
		var span = document.createElement('SPAN');
		span.innerHTML = data;
		errorInfo = span.innerText;
		alert(errorInfo || 'Unknown Error.');
		return errorInfo;
	}
}